import React from 'react';

const { Component } = React;

class App extends Component {
  test = async () => {
    const res = await new Promise(resolve => {
      setTimeout(() => {
        resolve(Math.floor(Math.random() * 100));
      }, 300);
    });
    console.log(res);
  };

  render() {
    return (
      <div className='hello-container'>
        <img
          onClick={() => this.props.history.push('/test')}
          src={require('./images/logo.png')}
        />
        <h1 onClick={ this.test }>react 模板项目开发中 233</h1>
      </div>
    );
  }
}

export default App;